package com.ourcraft.informationcollectionsystem.utils.statusCode;

public enum HistoryType {
    COMPANY_SUBMIT(0),
    CITY_RETURN(1),
    CITY_PASS(2),
    PROVINCE_RETURN(3),
    PROVINCE_PASS(4),
    ERROR(5);
    HistoryType(Integer type) { }

    public static HistoryType exePass(DataReportFormStatus d){
        return switch (d){
            case WAIT_CITY -> CITY_PASS;
            case WAIT_PROVINCE -> PROVINCE_PASS;
            default -> ERROR;
        };
    }

    public static HistoryType exeReturn(DataReportFormStatus d){
        return switch (d){
            case WAIT_CITY -> CITY_RETURN;
            case WAIT_PROVINCE -> PROVINCE_RETURN;
            default -> ERROR;
        };
    }
}
